package com.james.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import java.io.Serializable;
import java.math.BigDecimal;

/**
  * @ClassName: Food
  * @Author: JamesWang
  * @Date: 2021/4/22 13:50
  * @Description:  
  * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sy_food")
public class Food implements Serializable {
    /**
     * 菜品id
     */
    @JsonIgnore
    @TableId(value = "food_id", type = IdType.INPUT)
    private Integer foodId;

    /**
     * 菜品名称
     */
    @TableField(value = "food_name")
    private String foodName;

    /**
     * 菜品单价
     */
    @TableField(value = "food_price")
    private BigDecimal foodPrice;

    /**
     * 菜品图片
     */
    @TableField(value = "food_pic")
    private String foodPic;

    /**
     * 菜品库存
     */
    @TableField(value = "food_stock")
    private Integer foodStock;

    /**
     * 菜品状态（0:禁用 1:正常）
     */
    @TableField(value = "food_status")
    private Integer foodStatus;

    /**
     * 菜品分类对应id
     */
    @TableField(value = "menu_id")
    private Integer menuId;

    @TableField(exist = false)
    private Integer foodCount;

    private static final long serialVersionUID = 1L;

    public static final String COL_FOOD_ID = "food_id";

    public static final String COL_FOOD_NAME = "food_name";

    public static final String COL_FOOD_PRICE = "food_price";

    public static final String COL_FOOD_PIC = "food_pic";

    public static final String COL_FOOD_STOCK = "food_stock";

    public static final String COL_FOOD_STATUS = "food_status";

    public static final String COL_MENU_ID = "menu_id";
}